home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- set mySprite = the clickOn
-
- -- save the starting position of the seed
- set startH = the locH of sprite mySprite
- set startV = the locV of sprite mySprite
-
- -- let the user drag the seed around, snapping into place, using the same cast member for the
- -- drag item, and using sprite 11 as the constrain sprite
- set snapped = dragItem(hVals, 357, FALSE, 11)
-
- -- when the mouse button is released, if the seed is not snapped into place, then...
- -- if not snapped then
- -- if the seed is within one of the two environments, and the spot on that side is still open
- -- if (sprite mySprite within 18) then
- -- set snapH = 568
- -- else if (sprite mySprite within 19) then
- -- set snapH = 422
- -- else if (sprite mySprite within 20) then
- -- set snapH = 276
- -- else
- -- set snapH = 0
- -- end if
-
- -- if snapH = 0 then
- -- snap the seed back to its starting position
- puppetSound "Echo Gling.S"
- set the locH of sprite mySprite = startH
- set the locV of sprite mySprite = startV
- updateStage
- -- else
- -- -- move the seed into the seed area on this side
- -- snapTo mySprite, snapH, 357
- -- set snapped = TRUE
- -- end if
- end if
-
- -- if snapped then
- -- go to frame "grow"
- -- end if
-
- end mouseDown